import { createRouter, createWebHashHistory } from "vue-router";
import LoginView from "../views/login.vue"; // 登录页
import HomeView from "../views/index.vue"; // 首页
import pages from "./pages"; // 页面管理
const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "Login",
      component: LoginView,
    },
    {
      path: "/index",
      name: "Home",
      component: HomeView,
      redirect: "/upluads",
      children:[
        ...pages
       
      ]
    },
  ],
});
export default router;
